#include <iostream>
#include "conn.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>

using std::string;

class conn;
int new_socket();

int listen_socket(int sfd, short port);

int accept_socket();

int connect_socket(int sfd, const string&ip, int port);

void drive_machine(int sfd, short int eventType, void *args);

